package com.alwaysdata.esm3.trait_sep.controleur;

import javax.swing.JOptionPane;

import com.alwaysdata.esm3.trait_sep.dal.InjectionDAO;
import com.alwaysdata.esm3.trait_sep.dal.PersonneDAO;
import com.alwaysdata.esm3.trait_sep.modele.Injection;

public class MgtInjection {
	
	private static MgtInjection instance = null;
	
	private MgtInjection(){
	}
	
	public static MgtInjection getInstantce(){
		if (instance == null){
			instance = new MgtInjection();
		}
		
		return instance;
	}
	
	public void sauveInjection(Injection uneInjection, String pMail){
		
		int id = 0;
		
		try {
			InjectionDAO.getInstance().sauveInjection(uneInjection, pMail);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			JOptionPane.showMessageDialog(null, e.getMessage(), "Erreur", JOptionPane.ERROR_MESSAGE);
		}
	}
}


